package com.yxdj.service.api;

import com.yxdj.common.core.constant.SecurityConstants;
import com.yxdj.common.core.constant.ServiceNameConstants;
import com.yxdj.common.core.domain.R;
import com.yxdj.service.api.domain.ServiceDetail;
import com.yxdj.service.api.factory.RemoteServiceDetailFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author 韩总
 */
@FeignClient(contextId = "remoteServiceDetailService", value = ServiceNameConstants.SERVICE_SERVICE, fallbackFactory = RemoteServiceDetailFallbackFactory.class)
public interface RemoteServiceDetailService {

    /**
     * 根据id查询服务详情
     * @param id
     * @return
     */
    @GetMapping("/detail/app/getServiceDetailById/{id}")
    R<ServiceDetail> getServiceDetailById(@PathVariable(name = "id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
